

# 编译linux下easylogger

cmake_minimum_required(VERSION 3.10.2)
project(easyLogger VERSION 1.0.0 LANGUAGES C)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g3 -Wall")

set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/build/lib)
set(BINARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/build/bin)

include_directories(${PROJECT_SOURCE_DIR}/include/)
set(SOURCE_FILE src/elog_async.c src/elog_buf.c src/elog_file_port.c src/elog_file.c src/elog_port.c src/elog_utils.c src/elog.c)

add_library(${PROJECT_NAME} SHARED ${SOURCE_FILE})



set(MAIN_FILE src/main.c)
add_executable(easyLoggerTest ${MAIN_FILE})
link_directories(${PROJECT_SOURCE_DIR}/lib)
target_link_libraries(easyLoggerTest easyLogger pthread)